package cli

import (
	"blockchaingo/block"
	"blockchaingo/wallet"
	"fmt"
)

//获取钱包
func (cli *CLI) getWallets() {
	bc := block.NewBlockChain("test")
	defer block.Close(bc)
	wallets, _ := wallet.NewWallets()
	i := 0
	for _, w := range wallets.Wallets {
		i++
		fmt.Printf("Your address %d : %s --- %d\n", i, w.GetAddress(), cli.getTotalBalance(bc, string(w.GetAddress()[:])))
	}

}
